import { createApp } from 'vue'

import App from './App.vue'
import store from './store'
import router from './router'
import i18n from './locals'

import './assets/css/main.css'
import './assets/css/index.scss'
import 'element-plus/es/components/loading/style/css'
import 'element-plus/es/components/message/style/css'
import 'element-plus/es/components/message-box/style/css'

const app = createApp(App)

app.use(router)
app.use(store)
app.use(i18n)

import './permission' // permission control

// svg图标
import 'virtual:svg-icons-register'
import SvgIcon from '@/components/svgIcon.vue'
import Pagination from '@/components/Pagination/index.vue'
import { resetForm } from '@/utils/index'

app.component('svg-icon', SvgIcon)
app.component('Pagination', Pagination)
app.config.globalProperties.resetForm = resetForm

import { timeFormat } from '@/utils/index'
// 全局方法挂载
app.config.globalProperties.timeFormat = timeFormat

app.mount('#app')
